var tp_arr = new Array(
    "/static/app/transverse/home/login/index/index.htm"
);

window.current = new Vue({
    el: '#current',
    template: window.getTemplate(tp_arr),
    data: {
        login_account:'',
        login_pass:''
    },
    // 属性监听器
    watch: {
        'fccode': function (newVal, oldVal) {
            if (!test_number.test(newVal)) {
                this.fccode = oldVal;
            }
        },
        'login_account': function (newVal, oldVal) {
            if (!test_number.test(newVal)) {
                this.login_account = oldVal;
            }
        },
        'cur_code': function (newVal, oldVal) {
            if (!test_number.test(newVal)) {
                this.cur_code = oldVal;
            }
        },
        'pow_code': function (newVal, oldVal) {
            if (!test_number.test(newVal)) {
                this.pow_code = oldVal;
            }
        }
    },
    filters: {

    },
    computed: {

    },
    methods: {
        loginCheck:function () {
            var phone = this.login_account;
            var pass = this.login_pass;
            if(!phone || !pass){
                return;
            }
            $('#register').submit();
        }
    }
});

$("input[name='login_pass']").keyup(function(event){
    if(event.keyCode ==13){
        current.loginCheck();
    }
});